IXI Visual Tcl reads the standard OSF/Motif resource files during startup.
When the graphical server process starts up, it reads the resources
in /usr/lib/X11/app-defaults/Vtcl
. Then it checks
xrdb, and finally
$HOME/.Xdefaults-hostname
.
To specify resources for the graphical server, use the classname Vtcl. For example, to specify a foreground of gold and a background of blue, say:
Vtcl*foreground: gold Vtcl*background: blue
To specify resources for an individual vtcl
script, use the name passed to VtOpen as the
application's classname. For example, the following script puts up a
dialog with the Label Hello World!
and an
OK button:
set app [VtOpen myprog] set form [VtStartForm $app.form -ok] set lab [VtLabel $form.label -label "Hello World"] VtShow $form VtMainLoop
To specify that the OK button should turn green when depressed (armed) for this script, the following line should be added to the resource file:
*myprog*armColor: green
Note that since the graphical server is a daemon and only reads resources at startup, it must be killed and restarted for new resources to take effect. This can be done using kill or VtQuitServer.